<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 500px;
            height: 500px; 
            border: 2px solid black;
            margin: 100px auto;
            display: flex;
            /* 调整主轴 */
            /* justify-content:space-evenly; 
            */
            /* center  flex-start  flex-end 对齐方式  space-between两端对齐   */
            /* 改变主轴 */
            /* flex-direction: column;  */
            /* row column row-reverse column-reverse */
            /* 调整侧轴 */  
            /* align-items: center; */
            flex-wrap: wrap;
            /* 解决折行  */
            /* align-content: flex-start; */
            /* 控制折行后出现的问题  */
            

        }

        .box div {
            width: 100px;
            height: 100px; 
            border: 1px dashed red;
        }
    </style>
</head>

<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>3</div>
    </div>
</body>

</html>